
{extend name="layout:base" /}

{block name="content"}
<div id="LAY_app">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header">
            <!-- 头部区域 -->
            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item layadmin-flexible" lay-unselect>
                    <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
                        <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
                    </a>
                </li>
                <li class="layui-nav-item" lay-unselect>
                    <a href="javascript:;" layadmin-event="refresh" title="刷新">
                        <i class="layui-icon layui-icon-refresh-3"></i>
                    </a>
                </li>
            </ul>
            <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
                <li class="layui-nav-item layui-hide-xs" lay-unselect>
                    <a href="javascript:;" layadmin-event="fullscreen">
                        <i class="layui-icon layui-icon-screen-full"></i>
                    </a>
                </li>
                <li class="layui-nav-item" lay-unselect>
                    <a href="javascript:;">
                        <cite>{$Think.session.admin.name}</cite>
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a lay-href="{:url('/admin/Index/change_pwd')}">修改密码</a></dd>
                        <hr>
                        <dd><a href="{:url('/admin/Auth/logout')}">退出</a></dd>

                    </dl>
                </li>
                <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
                    <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
                </li>
            </ul>
        </div>

        <!-- 侧边菜单 -->
        <div class="layui-side layui-side-menu">
            <div class="layui-side-scroll">
                <div class="layui-logo" lay-href="/admin">
                    <span>后台管理系统</span>
                </div>

                <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu"
                    lay-filter="layadmin-system-side-menu">
                    <li data-name="home" class="layui-nav-item layui-nav-itemed">
                        <a href="javascript:;" lay-tips="控制台" lay-href="{:url('/admin/Index/console')}">
                            <i class="layui-icon layui-icon-home"></i>
                            <cite>控制台</cite>
                        </a>
                    </li>
                    {if condition="$Think.session.admin.levelNum >1 "}
                    <li data-name="about" class="layui-nav-item ">
                        <a href="javascript:;" lay-tips="公告管理" lay-direction="2">
                            <i class="layui-icon layui-icon-app"></i>
                            <cite>公告管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd><a lay-href="{:url(('/admin/gg/index'))}">公告管理</a></dd>
                        </dl>
                    </li>
                    {/if}

<!--                    if (session("levelNum")>1 and  session("departid")=3) or session("levelNum")=50 then-->
                    {if condition="$Think.session.admin.levelNum ==50 or ($Think.session.admin.levelNum>1 and $Think.session.admin.departid==3)"}
                    <li data-name="case" class="layui-nav-item ">
                        <a href="javascript:;" lay-tips="员工管理" lay-direction="2">
                            <i class="layui-icon layui-icon-app"></i>
                            <cite>员工管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd><a lay-href="{:url(('/admin/admin/index'))}">员工管理</a></dd>
                        </dl>
                    </li>
                    {/if}

<!--                    <%if session("departid")=2 or session("levelNum")=50 then%>-->
                    {if condition="$Think.session.admin.levelNum ==50 or  $Think.session.admin.departid==2"}
                    <li data-name="news" class="layui-nav-item ">
                        <a href="javascript:;" lay-tips="客户管理" lay-direction="2">
                            <i class="layui-icon layui-icon-app"></i>
                            <cite>客户管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd><a lay-href="{:url(('/admin/user/index'))}">客户列表</a></dd>
                            <dd><a lay-href="{:url(('/admin/user/qf'))}">欠费客户</a></dd>
                            <dd><a lay-href="{:url(('/admin/user/stop'))}">丢单</a></dd>
                            <dd><a lay-href="{:url(('/admin/user/state'))}">待审核客户</a></dd>
                        </dl>
                    </li>
                    {/if}

                    {if condition="$Think.session.admin.levelNum ==50 or  $Think.session.admin.departid==3"}
                    <li data-name="advantage" class="layui-nav-item ">
                        <a href="javascript:;" lay-tips="优化管理" lay-direction="2">
                            <i class="layui-icon layui-icon-app"></i>
                            <cite>优化管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            {if condition="$Think.session.admin.levelNum ==50 or  $Think.session.admin.id==29"}
                            <dd><a lay-href="{:url(('/admin/seo/moneyList'))}">金额返还</a></dd>
                            <dd><a lay-href="{:url(('/admin/seo/moneyReturn'))}">金额返还(按网站)</a></dd>
                            {/if}

                            {if condition="$Think.session.admin.levelNum >1"}
                                <dd><a lay-href="{:url(('/admin/seo/index'))}">所有站点</a></dd>
                            {else}
                                <dd><a lay-href="{:url(('/admin/seo/my'))}">我的站点</a></dd>
                            {/if}

                            <dd><a lay-href="{:url(('/admin/seo/soSeo'))}">可申请站点</a></dd>
                            <dd><a lay-href="{:url(('/admin/seo/qf'))}">欠费站点</a></dd>
                            <dd><a lay-href="{:url(('/admin/seo/stop'))}">暂停站点</a></dd>
                        </dl>
                    </li>
                    {/if}

                    <li data-name="category" class="layui-nav-item ">
                        <a href="javascript:;" lay-tips="钱包管理" lay-direction="2">
                            <i class="layui-icon layui-icon-template"></i>
                            <cite>钱包管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            {if condition="$Think.session.admin.levelNum >1"}
                                <dd><a lay-href="{:url(('/admin/money/seoMoney'))}">优化师账户</a></dd>
<!--                            <dd><a lay-href="{:url(('/admin/money/applyList'))}">提现申请</a></dd>-->
                            {else}
<!--                            <dd><a lay-href="{:url(('/admin/money/my'))}">我的钱包</a></dd>-->
                            {/if}
                            <dd><a lay-href="{:url(('/admin/money/index'))}">关键词扣费明细</a></dd>
                        </dl>
                    </li>
                </ul>
            </div>
        </div>
        <!-- 页面标签 -->
        <div class="layadmin-pagetabs" id="LAY_app_tabs">
            <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
            <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
            <div class="layui-icon layadmin-tabs-control layui-icon-down">
                <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
                    <li class="layui-nav-item" lay-unselect>
                        <a href="javascript:;"></a>
                        <dl class="layui-nav-child layui-anim-fadein">
                            <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
                            <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
                            <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
                        </dl>
                    </li>
                </ul>
            </div>
            <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
                <ul class="layui-tab-title" id="LAY_app_tabsheader">
                    <li lay-id="{:url('/admin/Index/console')}" lay-attr="{:url('/admin/Index/console')}"
                        class="layui-this"><i class="layui-icon layui-icon-home"></i></li>
                </ul>
            </div>
        </div>


        <!-- 主体内容 -->
        <div class="layui-body" id="LAY_app_body">
            <div class="layadmin-tabsbody-item layui-show">
                <iframe src="{:url('/admin/Index/console')}" frameborder="0" class="layadmin-iframe"></iframe>
            </div>
        </div>
        <div class="layadmin-body-shade" layadmin-event="shade"></div>
    </div>
</div>
{/block}


{block name="script"}
    <script>
        layui.config({
            base: '__STATIC__/layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use('index');
    </script>
{/block}
